#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int n = 1;
	int i = 1;
	int b = 0;
	int ret = 1;
	scanf("%d", &n);
	for (i = 1;i <= n;i++)
		{
			ret= ret * i;
			b = b + ret;
		}
	printf("%d\n", b);
	return 0;
}